<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>tqf股票</title>
    <script src="https://libs.baidu.com/jquery/1.8.3/jquery.min.js"></script>
    <script src="../js/main.js"></script>
    <style>
        .center {
            text-align: center;
            border: 3px solid green;
            padding-top: 20px;
        }
    </style>
</head>
<body  class="center">
<input type="button" name="back" value="返回" onclick="javascript:history.back(-1);"/>
<h1>股票录入</h1>
<p>上证用sh+股票代码，深圳用sz+股票代码。</p>

<form  id="form">
    <p>股票代码:<input name="stockNo" type="text" id="no" tabindex="1" size="15" value=""/></p>
    <p>K　　值:<input name="kValue" type="text" id="k_value" tabindex="2" size="16" value=""/></p>
    <p><input type="button" value="提交" onclick="subm()">&nbsp;<input type="reset" value="重置"></p>
</form>

<script type="text/javascript">
    function subm() {
        //将form中的键值对转换为集合对象
        var serializeArray = $("#form").serializeArray();
        $.ajax({
            url: url+"/insertPostStock",
            type: "post",
            data: serializeArray,
            success: function (data) {
                alert(data.message)
            }
        })
    }
</script>
</body>
</html>